home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / russell / russell.lha / examples / typearg.r < prev    next >
Text File  |  1989-12-29  |  303b  |  18 lines

  1. let
  2.     f == func[x: val T; T: type t{+ :  func[x,y:val t] val t;
  3.                   New; New: func[val t]var t; V; := ;
  4.                   put: func[val t] val t}] {
  5.         let
  6.         y == New[x];
  7.         z == T$New[];
  8.         in
  9.         z := x;
  10.         put[y (T$+) z]; put "\n"
  11.         ni
  12.      }
  13. in
  14.     f[13, Short];
  15.     f[Long$13, Long];
  16.     f[13.0, Float]
  17. ni
  18.